package core.network.client2game.handler.room;

import business.player.Player;
import business.player.feature.PlayerRoom;
import com.ddm.server.websocket.def.ErrorCode;
import com.ddm.server.websocket.handler.requset.WebSocketRequest;
import core.network.client2game.handler.PlayerHandler;
import core.network.http.proto.SData_Result;

import java.io.IOException;

/**			
 * 继续观战房间
 */			
public abstract class CBaseContinueVisitRoom extends PlayerHandler {
			
    @SuppressWarnings("rawtypes")			
    @Override			
    public void handle(Player player, WebSocketRequest request, String message) throws IOException {			
        SData_Result result = player.getFeature(PlayerRoom.class).continueFindAndVisit();
        if (ErrorCode.Success.equals(result.getCode())) {			
            request.response(result.getData());			
        } else {			
            request.error(result.getCode(), result.getMsg());			
        }			
    }			
			
}			
